package Chapter_7;

import jdk.nashorn.internal.runtime.regexp.joni.exception.SyntaxException;

import java.util.HashSet;
import java.util.Iterator;

public class Test02 {
    public static void main(String[] args) {
        HashSet<Student> hs = new HashSet<>();
        hs.add(new Student("zhangshan",18));
        hs.add(new Student("zhangshan",18));
        Iterator iterator= hs.iterator();
        while(iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }
}
